#!/usr/sbin/perl
#                                                                         
#  Copyright (C) 1998, Silicon Graphics, Inc.                             
#  All Rights Reserved.                                                   
#                                                                         
#  UNPUBLISHED -- Rights reserved under the copyright laws of the United  
#  States.  Use of a copyright notice is precautionary only and does not  
#  imply publication or disclosure.                                       
#                                                                         
#  THIS SOFTWARE CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION OF     
#  SILICON GRAPHICS, INC. ANY DUPLICATION, MODIFICATION, DISTRIBUTION, OR 
#  DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR EXPRESS WRITTEN    
#  PERMISSION OF SILICON GRAPHICS, INC.                                   
#                                                                         
#  U.S. GOVERNMENT RESTRICTED RIGHTS LEGEND                               
#  Use, duplication or disclosure by the Government is subject to         
#  restrictions as set forth in FAR 52.227.19(c)(2) or subparagraph       
#  (c)(1)(ii) of the Rights in Technical Data and Computer Software       
#  clause at DFARS 252.227-7013 and/or in similar or successor clauses    
#  in the FAR, or the DOD or NASA FAR Supplement.  Unpublished-- rights   
#  reserved under the copyright laws of the United States.                
#  Contractor/manufacturer is Silicon Graphics, Inc.,                     
#  2011 N. Shoreline Blvd., Mountain View, CA 94039-7311.                 
#

require "$LibDiagsPath/recurse.pl";

sub ResourceTypesExists {
    local ($machine_name) = @_;
    local ($who);
    local ($Flag) = 0;

    $who = "#cluster#$Cluster#HA#ResourceGroups#$ResourceGroup";
    &get_tree($machine_name, $who);
    
    for ($i= 0; $i <= $No_of_children{$who}; $i++) {
	if ($child{$who, $i} eq ResourceTypes) {
	    if ($value_me{$who, $child{$who, $i}, $i} eq '<tree>') {
		print "res types: $value_me{$who, $child{$who, $i}, $i}\n";
		$Flag = 1;
	    }
	}
    }
    return ($Flag);
}
